package com.example.config;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;
/**
 *自定义导入哪些类
 *
 */
public class MyImportSelector implements ImportSelector {
    /**
     * AnnotationMetadata 当前标注@Import注解的所有注解信息
     * 可以反馈空数组不能返回null
     *
     */
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        String[] classes = {"com.example.bean.Pig"};
        return classes;
    }
}


